#ifndef __APP_MQTT_H_
#define __APP_MQTT_H_
#include <MQTTClient.h>
#include "log.h"
#include "string.h"

#define MQTT_BROKER_IP "192.168.182.1"
#define MQTT_CLIENT_ID "gyha"
#define MQTT_TOPIC_RECV "console_to_gateway0305"
#define MQTT_TOPIC_SEND "gateway_to_console0305"


/**
 * @brief MQTT的初始化
 */
int app_mqtt_init(void);


/**
 * @brief 发送消息
 */
int app_mqtt_sendMessage( char *message_payload );


 /**
  * @brief  注册接收消息的回调函数
  */
 void app_mqtt_registerMessageCallback( int (*callback)(char *message_payload) );

/**
 * @brief 销毁mqtt
 */
void app_mqtt_destroy(void);


#endif // __APP_MQTT_H_
